<!doctype html>
<html>
<head>
    <meta charset="utf-8">
    <title></title>
    <link rel="stylesheet" href="${staticServer}/inc/style/main.css"/>
    <link rel="stylesheet" href="${staticServer}/inc/style/page.css"/>
    <link rel="stylesheet" href="${staticServer}/inc/style/date/datepicker.css"/>
    <link rel="stylesheet" href="${staticServer}/css/consultant_client.css"/>
    <link rel="stylesheet" href="${staticServer}/css/consultant_client_reserve.css"/>
    <script src="${staticServer}/inc/js/jquery.js"></script>
    <script src="${staticServer}/inc/js/pageset.js"></script>
    <script src="${staticServer}/inc/js/datepicker.js"></script>
    <script src="${staticServer}/js/web/system_reserve_stat.js?3.2"></script>
    <script>

        function dataChange( v )
        {
            location.href = url_param( location.href, { start_date: v } );
        }
    </script>
    <style type="text/css">
        #reservelst td {
            color: #999;
            font-size: 12px;
        }
    </style>

    <script>
        $(function(){
            getFollow();

            $("#zonji1").html($("#center1 td").find("a").length);
            $("#zonji2").html($("#center2").find("a").length);
            $("#zonji3").html($("#center3").find("br").length);
            $("#zonji4").html($("#center4").find("br").length);
            $("#zonji5").html($("#center5").find("br").length);
            $("#zonji6").html($("#center6").find("br").length);
        });

        var getFollow = function(){
            var date = $("#start_date").val();
            $.post("${contextPath}/index/get_center_reserve.json", {
                "date":date
            }, function(ms) {
                var list = ms.list;
                var count = 0;
                for(var i=0;i<list.length;i++){
                    var re = new RegExp("-", "g");
                    var ids = (list[i].dates).replace(re,"")+list[i].region;
                    var objHtml =list.length+'<br/>';
                }
            });
        }

        $(document).ready(function(){
            var a = $("#weekrow").find("th").length;
            var i=$('div').size();//获得div标签的数目
            var j=$('.ff').size();//获得class为ff的font标签的数目
        })
    </script>
</head>

<body>
<div id="home_link">
    <ul>
        <li></li>
        <li>&gt;</li>
        <li>资源统计管理</li>
        <li>&gt;</li>
        <li class="current">中心到访统计</li>
    </ul>
</div>
<div id="container">
    <div id="title"></div>
    <table class="form_table">
        <tr>
            <td><label><b>查询条件：</b></label> <label for="start_date">统计日期：</label>
                <input type="text" id="start_date" size="15" value="${newday}" rel="DATE::Y-m-d;dataChange"/>
                <input type="button" value=" 刷新 " onclick="cdatetime(2)" />
                <input type="button" value=" 上一周 " onclick="cdatetime(-1)" />
                <input type="button" value=" 下一周 " onclick="cdatetime(1)" />
                <input type="button" value=" 最近一周 " onclick="cdatetime(0)" />
            </td>
        </tr>
    </table>
    <table id="reservelst">
        <tbody>
        <tr id="weekrow" class="even_row">
        	<th class="week">编号</th>
            <th class="week" width="150">中心地址</th>
            <th class="week">${BeforetwoDay}<br>星期一</th>
            <th class="week">${BeforeDay}<br>星期二</th>
            <th class="week">${today}<br>星期三</th>
            <th class="week">${tommorrow1}<br>星期四</th>
            <th class="week">${tommorrow2}<br>星期五</th>
            <th class="week">${tommorrow3}<br>星期六</th>
            <th class="week">${tommorrow4}<br>星期日</th>
            <th style="text-align: center;">总计</th>
            <th style="text-align: center;">实到</th>
            <th style="text-align: center;">未出现</th>
            <th style="text-align: center;">未到率</th>
        </tr>
        <#if office_List??>
            <#list office_List as list>
                <#if list.keyname!="CCEE06DEB51D">
                <tr class="odd_row" id="center${list_index?if_exists+1}">
                	<#if list_index?if_exists gt 1>
                		<td align="center">${list_index?if_exists}</td>
                	<#else>
                		<td align="center">${list_index?if_exists+1}</td>
                	</#if>
                	
                    <th rel="${list.keyname}" title="${list.name}" class="time">${list.name}</th>
                    <#if list.cout??>
                        <#list list.cout as clist>
                            <#if clist_index == 0>
                                <td align="center" id="${BeforetwoDay?replace('-','')}${list.keyname}">${clist.count}</td>
                            </#if>
                            <#if clist_index == 1>
                                <td align="center" id="${BeforeDay?replace('-','')}${list.keyname}">${clist.count}</td>
                            </#if>
                            <#if clist_index == 2>
                                <td align="center" id="${today?replace('-','')}${list.keyname}">${clist.count}</td>
                            </#if>
                            <#if clist_index == 3>
                                <td align="center" id="${tommorrow1?replace('-','')}${list.keyname}">${clist.count}</td>
                            </#if>
                            <#if clist_index == 4>
                                <td align="center" id="${tommorrow2?replace('-','')}${list.keyname}">${clist.count}</td>
                            </#if>
                            <#if clist_index == 5>
                                <td align="center" id="${tommorrow3?replace('-','')}${list.keyname}">${clist.count}</td>
                            </#if>
                            <#if clist_index == 6>
                                <td align="center" id="${tommorrow4?replace('-','')}${list.keyname}">${clist.count}</td>
                            </#if>
                        </#list>
                    </#if>
                    <td align="center" id="zonji" >${list.total_reserve}</td>
                    <td align="center">${list.real_visit}</td>
                    <td align="center">${list.not_visit}</td>
                    <#if list.rate!=''>
                        <td align="center">${list.rate}</td>
                    <#else>
                        <td align="center">0%</td>
                    </#if>
                </tr>
                </#if>
            </#list>
        </#if>
        <tr class="odd_row" id="center11111">
        	<td align="center"></td>
            <th rel="" title="" class="time">总计</th>
            <td align='center' colspan='7'>
            <td align="center" id="zonji" >${total}</td>
            <td align="center">${real}</td>
            <td align="center">${not}</td>
        <#if totrate!=''>
            <td align="center">${totrate}</td>
        <#else>
            <td align="center">0%</td>
        </#if>
            </th>
        </tr>
        </tbody>
    </table>
</div>
</body>
</html>